<template>
  <div>
    <Header />
    <div class="manager_box">
      <div class="manager_details">
        <img :src="manager.headUrl" alt class="manager_head" />
        <div>
          <p class="manager_name" v-if="manager.name">
            {{ manager.name }}
          </p>
          <p class="manager_text">满意度{{ manager.evaluate }}%</p>
          <p class="manager_label">{{ manager.info }}</p>
        </div>
        <div class="manager_img">
          <img
            src="../../assets/image/dh_2.png"
            alt
            @click="callPhone(manager.telephone)"
          />
          <img src="../../assets/image/zx_2.png" alt @click="On53" />
        </div>
      </div>
      <div class="manager_list">
        <div>
          <p class="text">从业年数</p>
          <p class="num">{{ manager.workYear }}</p>
        </div>
        <div>
          <p class="text">勘探楼盘</p>
          <p class="num">{{ manager.explorationBuilding }}</p>
        </div>
        <div>
          <p class="text">服务人数</p>
          <p class="num">{{ manager.customerNum }}</p>
        </div>
      </div>
      <div class="manager_text_box">
        <p><span>个人成绩：</span>{{ manager.performance }}</p>
        <p><span>个主营板块：</span>{{ manager.performance }}</p>
      </div>
      <p class="lion"></p>
      <p class="house_title">主要负责房源</p>
      <List :num="num" v-bind:list="manager.reponsibleHouseList" />
    </div>
    <Right />
    <Footer />
  </div>
</template>
<script>
import rem from "@/assets/js/rem.js";
import Header from "@/components/m_file/header.vue";
import Footer from "@/components/m_file/footer.vue";
import Right from "@/components/m_file/right.vue";
import List from "@/components/m_file/list.vue";
export default {
  data() {
    return {
      id: "",
      num: "",
      manager: {}
    };
  },
  mounted() {
    this.id = this.$route.query.id;
    this.OnfpDetail();
  },
  methods: {
    On53() {
      window.location.href =
        "https://tb.53kf.com/code/client/9a12bb00652ff2c013fe004ae3947f845/1";
    },
    callPhone(val) {
      window.location.href = "tel://" + val;
    },
    OnfpDetail() {
      this.instance
        .fpManagerDetail({
          id: this.id
        })
        .then(res => {
          if (res.data.code == "0") {
            this.manager = res.data.data;
            console.log(this.manager);
          }
        });
    }
  },
  components: {
    Header,
    Footer,
    Right,
    List
  }
};
</script>
<style lang="less" scoped>
.manager_box {
  .manager_details {
    padding: 0.2rem 0.2rem;
    display: flex;
    .manager_head {
      width: 0.625rem;
      height: 0.625rem;
      border-radius: 50%;
      margin-right: 0.3rem;
    }

    .manager_name {
      font-size: 0.16rem;
      font-weight: bold;
      margin-bottom: 0.09rem;
      color: #222222;
      span {
        background: #f5643e;
        border-radius: 15px;
        font-size: 0.1rem;
        color: #ff980f;
        padding: 0.02rem 0.05rem;
      }
    }
    .manager_text {
      margin-bottom: 0.11rem;
      font-size: 0.12rem;
      color: #ff980f;
    }
    .manager_label {
      font-size: 0.12rem;
      color: #9498a0;
    }
    .manager_img {
      margin-left: 0.5rem;
      overflow: hidden;
      img {
        vertical-align: super;
        width: 0.4rem;
        height: 0.4rem;
        border-radius: 50%;
        float: left;
        margin-right: 0.2rem;
      }
    }
  }
  .manager_list {
    display: flex;
    padding-bottom: 0.2rem;
    margin: 0rem 0.2rem;
    border-bottom: 1px solid #e5dfdf;
    div {
      width: 33.33%;
      text-align: center;

      .text {
        font-size: 0.12rem;
        color: #333333;
        line-height: 0.12rem;
      }
      .num {
        margin-top: 0.1rem;
        font-size: 0.22rem;
        font-weight: bold;
        color: #252829;
        line-height: 0.12rem;
      }
    }
  }
  .manager_text_box {
    font-size: 0.12rem;
    margin: 0.2rem;
    color: #888;
    p {
      margin-bottom: 0.1rem;
    }
    span {
      color: #333;
    }
  }
  .lion {
    width: 100%;
    height: 0.1rem;
    background: #f8f8f8;
  }
  .house_title {
    margin: 0.2rem;
    font-size: 0.15rem;
    font-weight: bold;
    color: #333333;
    line-height: 0.24rem;
  }
}
</style>
